import time
import math

# Class used to create an enum
# example: x = Enum('No', 'Yes') 
# x.No = 0, x.Yes = 1
class Enum(object):
   def __init__(self, *keys):
      self.__dict__.update(zip(keys, range(len(keys))))
   def size(self):
      return len(self.__dict__)
	  
	  
	  
def startTime():
	return time.time()
	
def endTime():
	return time.time()
	
def getRunTime():
	
	
	
def getTimeString(start,end):
    # Result is in seconds
    elapsed = end - start 
    
    minutes = 0
    seconds = 0
	
    if elapsed > 60: 
        minutes = math.floor(elapsed / 60 )
        seconds = elapsed - minutes*60
        if minutes == 1:
            mins = "minute"
        else :
            mins = "minutes"
        str = "Test took %f %s and %.2f seconds to complete" % (minutes,mins,seconds)
    else:
        str = "Test took %.2f seconds to complete" % (elapsed)
		
		
    return str	